package templates

import org.uqbar.arena.widgets.Panel
import org.uqbar.arena.widgets.Label
import java.awt.Color

class DoubleLabel {
	
	/** Crea un label con un titulo y un label bindeado a una propiedad */
	new(Panel panel,String titleFstLabel,String propertyToBindSndLabel){
		create(panel,titleFstLabel,propertyToBindSndLabel)
	}
	
	def create(Panel panel,String titleFstLabel,String propertyToBindSndLabel){
		new Label(panel) => [
			setText(titleFstLabel)
			setBackground(Color ::LIGHT_GRAY)
			setWidth(174)
			setHeight(20)
		]
		
		new Label(panel) => [
			bindValueToProperty(propertyToBindSndLabel)
			setWidth(174)
			setHeight(20)
		]
	}
	
	}
	